onload = function(  ){
    var oBigImgList = document.getElementsByClassName("bigImgList")[0];
    var aBigImgListLi = oBigImgList.getElementsByTagName("li");

    var oTabHead = document.getElementsByClassName("tabHead")[0];
    var aTabHeadLi = oTabHead.getElementsByTagName("li");

    var oTabContent = document.getElementsByClassName("tabContent")[0];
    var aTabContentList = oTabContent.getElementsByTagName("li");


    for( var i=0; i<aTabHeadLi.length; i++ ){
        aBigImgListLi[i].index = i;
        aTabHeadLi[i].index = i;
        aTabHeadLi[i].onclick = function(){
            //alert( this.index );
            for( var j=0; j<aTabHeadLi.length; j++ ){
                aBigImgListLi[j].style.display = 'none';
                aTabContentList[j].style.display = 'none';
                aTabHeadLi[j].className = '';

                aBigImgListLi[this.index].style.display = 'block';
                aTabContentList[this.index].style.display = 'block';
                aTabHeadLi[this.index].className = 'active';
            }

        }
    }


}